<?php  session_start();
/**
* @package		Parents@School
* @copyright	                Copyright (C) 2008 Kristof Beckers. All rights reserved.
* @Version		2.0
* @license		GNU/GPL, see LICENSE.php
**/
include ("../include/config.php");
require_once ("../include/db.php");
include ("../include/header.php");
include ("../include/dateview.php");
?>
<head>
<link rel="stylesheet" href="../css/template_css.css" type="text/css"/> 
</head>

<body>
<div align="center"><img src="<?php echo "$logo" ; ?>" /><br><br>
<a href="javascript:javascript:history.go(-1)"/><img src="<?php echo "$back" ; ?>" border="0"/></a><br><br>
<?php

if(isset($_SESSION['myusername'])){
//$user = $_SESSION['myusername'];
$username1 = $_SESSION['myusername'];
$username = explode(".",$username1);
$user = strtoupper("$username[1] $username[2]");
$sql = "SELECT * FROM $tbres WHERE Gebruikersnaam='$user' AND datum='$dateview'";
$result = mysql_query($sql);
echo " <p align='center' class='bodytext'><em>Dit zijn de reservaties voor <b>$user</b></em></p><br /><br />";
echo " <table class='moduletable-latest1'>
		<tr>
		<td></td>
		<td >Leerkracht</td>
		<td >Uur</td>
		<td >Vak</td>
		<td >Lokaal</td>
		<td >Datum</td>
		<td></td>
		</tr>
		</table>";
while ($row = mysql_fetch_array($result)){
		$lkid = $row['LeerkrachtID'];
		$lknaam = $row['Leerkrachtnaam'];
		$uur = $row['Uur'];
		$resid = $row['ReservatieID'];
		$lok = $row['Lokaal'];
		$vak = $row['Vak'];
		$datum = $row['datum'];
		

	echo " <table class='moduletable-latest1'>
		<tr>
		<td ><img src='../images/check.png'></td>
		<td >$lknaam</td>
		<td >$uur</td>
		<td >$vak</td>
		<td >$lok</td>
		<td>$datum</td>
		<td ><a href='verwijder_reservatie.php?id=$resid'/><img src='../images/delete.png'><em> verwijder afspraak</em></a><br></td><hr />
		</tr>
		</table><br>
		";}
		echo "$printpage ";}
else{
header("location:index.php");
}


?>
</div>
</body>
